﻿<UserControl x:Class="QUT.Bio.Tags.ObjectTagAdder"
			 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
			 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
			 xmlns:util="clr-namespace:QUT.Bio.Util"
			 >
	<Grid Name="LayoutRoot"
		  Background="White">
		<Grid.RowDefinitions>
			<RowDefinition Height="auto" />
			<RowDefinition Height="auto" />
			<RowDefinition Height="*" />
			<RowDefinition Height="auto" />
		</Grid.RowDefinitions>

		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="auto" />
			<ColumnDefinition Width="5" />
			<ColumnDefinition Width="*" />
			<ColumnDefinition Width="*" />
		</Grid.ColumnDefinitions>

		<!-- From -->
		<TextBlock Text="From"
				   Grid.Row="0"
				   Grid.Column="0" />

		<!-- Vocabularies -->
		<StackPanel Name="vocabPanel"
					Grid.Row="0"
					Grid.Column="2"
					Orientation="Horizontal"
					Grid.ColumnSpan="2">

			<StackPanel Orientation="Vertical">
				<TextBlock Text="People:" />
				<Border BorderThickness="1"
						BorderBrush="Silver">
					<StackPanel Orientation="Vertical">
						<CheckBox Name="myTagCheckBox"
								  Content="Tags I've used"
								  Click="FilterClicked"
								  IsChecked="True" />
						<CheckBox Name="myFriendsCheckBox"
								  Content="Tags by my friends"
								  Click="FilterClicked"
								  IsChecked="True" />
						<CheckBox Name="anonCheckBox"
								  Content="Tags by anonymous"
								  Click="FilterClicked"
								  IsChecked="True" />
					</StackPanel>
				</Border>
			</StackPanel>

			<StackPanel Orientation="Vertical"
						Margin="5 0 5 0">
				<TextBlock Text=" " />
				<RadioButton Name="andButton"
							 Content="And"
							 GroupName="AndOr"
							 Click="FilterClicked" />
				<RadioButton Name="orButton"
							 Content="Or"
							 GroupName="AndOr"
							 IsChecked="True"
							 Click="FilterClicked" />
			</StackPanel>

			<StackPanel Orientation="Vertical">
				<TextBlock Text="Vocabularies:" />
				<Border BorderThickness="1"
						BorderBrush="Silver">
					<StackPanel Orientation="Vertical">
						<CheckBox Name="goCheckBox"
								  Content="Gene ontology"
								  IsChecked="True"
								  Click="FilterClicked" />
						<CheckBox Name="keywordCheckBox"
								  Content="Keywords"
								  IsChecked="True"
								  Click="FilterClicked" />
					</StackPanel>
				</Border>
			</StackPanel>
		</StackPanel>

		<!-- Peefix -->
		<TextBlock Text="Prefix"
				   Grid.Row="1"
				   Grid.Column="0"
				   Margin="0 8 0 0" />

		<!-- Filter text -->
		<Grid Name="filterTextHolder"
			  Grid.Row="1"
			  Grid.Column="2"
			  Grid.ColumnSpan="2"
			  Margin="0 5 0 0">
			  
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="*" />
				<ColumnDefinition Width="auto" />
			</Grid.ColumnDefinitions>

			<util:WatermarkedTextBox x:Name="filterText"
					 TextChanged="FilterTextChanged"
					 Watermark="Restrict the list of suggested tags. Click [+] to create a new tag."
					 Grid.Column="0" />

			<Button x:Name="plusButton"
					Width="15"
					Height="15"
					Margin="3 0 3 0"
					Grid.Column="1"
					IsEnabled="False"
					Click="PlusButtonClicked">
				<ContentControl.Content>
					<TextBlock Text="+"
							   Margin="-1 -4 0 0" />
				</ContentControl.Content>
			</Button>
		</Grid>

		<util:ObjectListSelectionControl Name="tagSelector"
										Grid.Row="2"
										Grid.Column="2"
										Grid.ColumnSpan="2" />

		<TextBlock Text="Apply to"
				   Grid.Row="4"
				   Grid.Column="0"
				   Margin="0 5 0 0" />

		<StackPanel Orientation="Vertical"
					Grid.Row="4"
					Grid.Column="2"
					Grid.ColumnSpan="2"
					Margin="0 5 0 0">

			<RadioButton Name="justThisObjectButton"
						 Content="Just this object"
						 IsChecked="True"
						 Click="FilterClicked"
						 GroupName="whichObjects" />

			<RadioButton Name="selectedObjectButton"
						 Content="All selected objects"
						 Click="FilterClicked"
						 GroupName="whichObjects" />
		</StackPanel>
	</Grid>
</UserControl>
